home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / TestParts / Draw / DrawSI.xh < prev    next >
Encoding:
Text File  |  1997-01-01  |  4.1 KB  |  201 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: DrawSI.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_DrawSI_xh
  18. #define SOM_DrawSI_xh
  19.  
  20. class DrawSI;
  21.  
  22. #define DrawSI_MajorVersion 0
  23. #define DrawSI_MinorVersion 0
  24.  
  25. /*
  26.  * Passthru lines: File: "C.xh", "before"
  27.  */
  28.  
  29.  
  30. class    SIHelperAbs;
  31.  
  32.  
  33. /* C++ SOM defs */
  34. #include <somcls.xh>
  35. #include <somcm.xh>
  36.  
  37. /* C++ parent defs */
  38. #ifndef SOM_ODSemanticInterface_xh
  39. #include <SemtIntB.xh>
  40. #endif
  41.  
  42. #ifndef DrawSI_API
  43. #define DrawSI_API
  44. /*
  45.  * -- The Class API
  46.  */
  47.  
  48. /*
  49.  * Start of user-defined types:
  50.  */
  51. class SOMClass;
  52. class SOMObject;
  53. class ODFrame;
  54. class ODFacet;
  55. class ODObject;
  56. class ODExtension;
  57. class ODRefCntObject;
  58. class ODSemanticInterface;
  59. class ODMessageInterface;
  60. class ODSession;
  61. class ODPart;
  62. class ODDesc;
  63. class ODAppleEvent;
  64. class ODOSLToken;
  65. class DrawSI;
  66.  
  67. /*
  68.  * End of user-defined types.
  69.  */
  70.  
  71. #ifdef OLDIBMSOMAPISUPPORT
  72. #define DrawSICClassData DrawSIClassData
  73. #define DrawSINewClass(major,minor) somNewVersionedClassReference(DrawSI,major,minor)
  74. #endif
  75.  
  76. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  77. #define DrawSIMetaClass SOMClass
  78.  
  79. #if PRAGMA_ALIGN_SUPPORTED
  80. #  pragma options align=power
  81. #endif
  82.  
  83. /* The API to the DrawSI class object, and the methods it introduces. */
  84. SOMEXTERN struct DrawSIClassDataStructure {
  85. #ifdef OLDIBMSOMAPISUPPORT
  86.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  87. #else
  88.     long zero;
  89. #endif
  90.     somStaticClassInfo *sci;
  91.     somDToken        instanceDataToken;
  92.     long reserved [3];
  93.     somMToken InitCPlusSemanticInterface;
  94.     somMToken GetSIHelper;
  95. } SOMDLINK DrawSIClassData;
  96.  
  97. #if PRAGMA_ALIGN_SUPPORTED
  98. #  pragma options align=reset
  99. #endif
  100.  
  101. #if !defined(DrawSI_Class_Source) && !defined(SOM_Module_drawsi_Source)
  102. #if PRAGMA_IMPORT_SUPPORTED
  103. #pragma import list DrawSIClassData
  104. #endif
  105. #endif
  106.  
  107.  
  108. /*
  109.  * -- Typedefs and inline method declarations for left path inherited methods
  110.  * -- are omitted because this compilation had -museinheritedmethods in effect
  111.  */
  112.  
  113.  
  114. /*
  115.  * -- Typedefs for DrawSI Method Procedures
  116.  */
  117. SOMEXTERN {
  118. typedef void   (* SOMLINK somTD_DrawSI_InitCPlusSemanticInterface)(DrawSI *somSelf, Environment *ev,
  119.         ODPart* base,
  120.         SIHelperAbs* helper,
  121.         ODSession* session);
  122. typedef SIHelperAbs*   (* SOMLINK somTD_DrawSI_GetSIHelper)(DrawSI *somSelf, Environment *ev);
  123. }
  124.  
  125. #endif /* DrawSI_API */
  126.  
  127.  
  128. /*
  129.  * -- This emitter treats Method Tokens as Thunks by default.
  130.  * -- Use the sc modifier "nothunks" to change this default
  131.  */
  132. #undef somresolve_
  133. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  134.  
  135. /*
  136.  * -- The C++ Wrapper Class for DrawSI
  137.  */
  138. class DrawSI : public ODSemanticInterface
  139. {
  140. public:
  141.  
  142. // DrawSI::new registers use of the class object, and then uses somNew
  143. // to allocate memory and load the object method table pointer. 
  144. void *operator new(size_t size)
  145. {
  146.     SOM_IgnoreWarning(size);
  147.     // Allocate memory using the default allocator for DrawSI, and
  148.     // clear mem & set method table pointer, call basic initialization
  149. #ifdef SOMCHKNULL
  150.     void * __somResult = (void *)
  151.       somNewObject(DrawSI);
  152.     SOMCHKNULL(__somResult);
  153.     return __somResult;
  154. #else
  155.     return (void*) somNewObject(DrawSI);
  156. #endif
  157. }
  158.  
  159. // DrawSI::delete uses the default deallocator for the object's class.
  160. void operator delete(void * obj)
  161. {
  162.     if (obj) {
  163.         SOM_Resolve(obj,SOMObject,somFree)
  164.            ( (SOMObject*) obj );
  165.     }
  166. }
  167.  
  168. /* method: InitCPlusSemanticInterface */
  169. void   InitCPlusSemanticInterface(Environment *ev,
  170.         ODPart* base,
  171.         SIHelperAbs* helper,
  172.         ODSession* session)
  173. {
  174.    SOM_ResolveD(this,DrawSI,DrawSI,InitCPlusSemanticInterface)
  175.     (this,ev,base,helper,session);
  176. #ifdef SOMCHKEXCEPT
  177.       SOMCHKEXCEPT;
  178. #endif
  179. }
  180.  
  181. /* method: GetSIHelper */
  182. SIHelperAbs*   GetSIHelper(Environment *ev)
  183. {
  184.    #ifdef SOMCHKEXCEPT
  185.    SIHelperAbs* __somResult = 
  186.       SOM_ResolveD(this,DrawSI,DrawSI,GetSIHelper)
  187.     (this,ev);
  188.       SOMCHKEXCEPT;
  189.    return __somResult;
  190. #else
  191.    return SOM_ResolveD(this,DrawSI,DrawSI,GetSIHelper)
  192.     (this,ev);
  193. #endif
  194. }
  195.  
  196. };   /* DrawSI */
  197.  
  198.  
  199.  
  200. #endif       /* SOM_DrawSI_xh */
  201.